import { defHttp } from '@/utils/http/axios'

// 查询工资基础配置列表
export function getRecordConfigPage(params) {
  return defHttp.get({ url: '/wages/record-config/page', params })
}

// 查询工资基础配置详情
export function getRecordConfig(id: number) {
  return defHttp.get({ url: `/wages/record-config/get?id=${id}` })
}

// 新增工资基础配置
export function createRecordConfig(data) {
  return defHttp.post({ url: '/wages/record-config/create', data })
}

// 修改工资基础配置
export function updateRecordConfig(data) {
  return defHttp.put({ url: '/wages/record-config/update', data })
}

// 修改工资基础配置状态
export function updateRecordConfigEnable(id, enable) {
  return defHttp.get({ url: `/wages/record-config/update-enable/${id}/${enable}`})
}

// 删除工资基础配置
export function deleteRecordConfig(id: number) {
  return defHttp.delete({ url: `/wages/record-config/delete?id=${id}` })
}

// 导出工资基础配置 Excel
export function exportRecordConfig(params) {
  return defHttp.download({ url: '/wages/record-config/export-excel', params }, '工资基础配置.xls')
}
